<template>
  <rx-dialog @handOk="handleSubmit" @cancel="cancel">
    <a-form :form="form">
      <a-form-item style="display:none">
        <a-input v-decorator="['id']"/>
      </a-form-item>	  
			  <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="i18n('form.application','应用ID')">
					<a-input :placeholder="i18n('form.application','应用ID','input')"
                             v-decorator="['appId', {rules: [{required: false, message:i18n('form.application','应用ID','input')}]}]"/>
			  </a-form-item>
			  <a-form-item :labelCol="labelCol" :label="i18n('form.authorId','授权人ID')">
					<a-input :placeholder="i18n('form.authorId','授权人ID','input')"
                             v-decorator="['authId', {rules: [{required: false, message: i18n('form.authorId','授权人ID','input')}]}]"/>
			  </a-form-item>
			  <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="i18n('form.authorName','授权人名称')">
					<a-input :placeholder="i18n('form.authorName','授权人名称','input')"
                             v-decorator="['authName', {rules: [{required: false, message:i18n('form.authorName','授权人名称','input')}]}]"/>
			  </a-form-item>
			  <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="i18n('form.company','所属公司ID')">
					<a-input :placeholder="i18n('form.company','所属公司ID','input')"
                             v-decorator="['companyId', {rules: [{required: false, message: i18n('form.company','所属公司ID','input')}]}]"/>
			  </a-form-item>
			  <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="i18n('form.definitionID','流程定义ID')">
					<a-input :placeholder="i18n('form.definitionID','流程定义ID','input')"
                             v-decorator="['defId', {rules: [{required: false, message: i18n('form.definitionID','流程定义ID','input')}]}]"/>
			  </a-form-item>
			  <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="i18n('form.definitionKEY','流程定义KEY')">
					<a-input :placeholder="i18n('form.definitionKEY','流程定义KEY','input')"
                             v-decorator="['defKey', {rules: [{required: false, message: i18n('form.definitionKEY','流程定义KEY','input')}]}]"/>
			  </a-form-item>
			  <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$ti18('rxForm.notes','备注')">
                    <a-textarea :placeholder="$ti18('rxForm.notes','备注','','input')"
                                v-decorator="['desc', {rules: [{required: false, message: $ti18('rxForm.notes','备注','input')}]}]" :rows="4" />
			  </a-form-item>
			  <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="i18n('form.instance','实例ID')">
					<a-input :placeholder="i18n('form.instance','实例ID','input')"
                             v-decorator="['instId', {rules: [{required: false, message: i18n('form.instance','实例ID','input')}]}]"/>
			  </a-form-item>
			  <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="i18n('form.delete','是否删除')">
					<a-input :placeholder="i18n('form.delete','是否删除','input')"
                             v-decorator="['isDelete', {rules: [{required: false, message:i18n('form.delete','是否删除','input')}]}]"/>
			  </a-form-item>
			  <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="i18n('form.status','状态')">
					<a-input :placeholder="i18n('form.status','状态','input')"
                             v-decorator="['status', {rules: [{required: false, message: i18n('form.status','状态','input')}]}]"/>
			  </a-form-item>
			  <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="i18n('form.name','标题')">
                    <a-textarea :placeholder="i18n('form.name','标题','input')"
                                v-decorator="['subject', {rules: [{required: false, message: i18n('form.name','标题','input')}]}]" :rows="4" />
			  </a-form-item>
			  <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="i18n('form.task','任务ID')">
					<a-input :placeholder="i18n('form.task','任务ID','input')"
                             v-decorator="['taskId', {rules: [{required: false, message: i18n('form.task','任务ID','input')}]}]"/>
			  </a-form-item>
			  <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$ti18('rxForm.type', '类型')">
					<a-input :placeholder="$ti18('rxForm.type', '类型','','input')"
                             v-decorator="['type', {rules: [{required: false, message: $ti18('rxForm.type', '类型','input')}]}]"/>
			  </a-form-item>
    </a-form>
  </rx-dialog>
</template>
<script>
  import BpmInstPermissionApi from '@/api/bpm/core/bpmInstPermission'
  import {BaseForm,RxDialog} from '@lowcode/jpaas-common-lib';
  export default {
    name: 'BpmInstPermissionEdit',
    mixins:[BaseForm],
    components: {
      RxDialog,
    },
    methods: {
        i18n(name, text, key) {
            return this.$ti18(name, text, "BpmInstPermission", key);
        },
      get(id){
        return BpmInstPermissionApi.get(id);
      },
      save(values){
        return BpmInstPermissionApi.save(values);
      }

    }
  }
</script>
